home *** CD-ROM | disk | FTP | other *** search
- BTEST(3I) Last changed: 4-13-99
-
-
- NNAAMMEE
- BBTTEESSTT, BBIITTEESSTT, BBJJTTEESSTT, BBKKTTEESSTT - Tests a bit of an integer value
-
- SSYYNNOOPPSSIISS
- BBTTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
- BBIITTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
- BBJJTTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
- BBKKTTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77
-
- SSTTAANNDDAARRDDSS
- Fortran
-
- Fortran extensions: BBIITTEESSTT, BBJJTTEESSTT, BBKKTTEESSTT
-
- DDEESSCCRRIIPPTTIIOONN
- The BBTTEESSTT, BBIITTEESSTT, BBJJTTEESSTT, and BBKKTTEESSTT intrinsic functions test a bit
- of an integer value. They accept the following arguments:
-
- _i Must be of type integer. For BBIITTEESSTT, it must be an integer
- (KIND=2) value. For BBJJTTEESSTT, it must be an integer (KIND=4)
- value. For BBKKTTEESSTT, it must be an integer (KIND=8) value.
-
- _p_o_s Must be of type integer. For BBIITTEESSTT, it must be an integer
- (KIND=2) value. For BBJJTTEESSTT, it must be an integer (KIND=4)
- value. For BBKKTTEESSTT, it must be an integer (KIND=8) value.
- It must be nonnegative and be less than BBIITT__SSIIZZEE((_i)).
-
- BBTTEESSTT, BBIITTEESSTT, BBJJTTEESSTT, and BBKKTTEESSTT are elemental functions. The names
- of these intrinsics cannot be passed as arguments.
-
- RREETTUURRNN VVAALLUUEESS
- BBTTEESSTT returns type default logical. BBIITTEESSTT returns type logical
- (KIND=2). BBJJTTEESSTT returns type logical (KIND=4). BBKKTTEESSTT returns type
- logical (KIND=8).
-
- The result has the value TTRRUUEE if bit _p_o_s of _i has the value 1. It has
- the value FFAALLSSEE if bit _p_o_s of _i has the value 0. The bit model
- defines the interpretation of an integer value as a sequence of bits.
- This model is described in the MMOODDEELLSS(3I) man page.
-
- EEXXAAMMPPLLEESS
- Example 1: BBTTEESSTT((88,,33)) has the value TTRRUUEE.
-
- Example 2: BBTTEESSTT((88__SSHHOORRTT,,33)) has the value TTRRUUEE.
-
- Example 3: Assume that AA has the following value:
-
- | 1 2 |
- | 3 4 |
-
- The value of BBTTEESSTT((AA,, 22)) is as follows:
-
- | false false |
- | false true |
-
- The value of BBTTEESSTT((22,, AA)) is as follows:
-
- | true false |
- | false false |
-
- SSEEEE AALLSSOO
- MMOODDEELLSS(3I)
-
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
- man page.
-